﻿<!DOCTYPE html>
<html onclick="ActiveCurrent()">
<head>
    <meta charset="utf-8" />
    <title>ddddddddddddddd</title>
    <script type="text/javascript" src="src/iNotify.js"></script>
</head>
<body onclick="ActiveCurrent()">

    <a href="javascript:inotifyTest()">请点击我测试一下！</a>
    <script type="text/javascript">
var iN = new iNotify({
    effect: 'flash',
    interval: 500,
    message:"有消息拉！2",
    audio:{
        file: ['s/msg.mp4','s/msg.mp3','s/msg.wav']
    },
    notification:{
        title:"通知！",
        body:'您来了一条新消息'
    }
});
        var count = 0;
        function inotifyTest() {
            for (var i = 0; i < 10; i++) {
                setTimeout(function () {
                    count = count + 1;
                    iN.setFavicon(count).setTitle('新标题').notify({
                        title: "新通知",
                        body: "打雷啦，下雨啦..."
                    }).player(); 
                }, 4000* i); 
            }
           
        }
        function ActiveCurrent() {
            count = 0;
            iN.setTitle();
        }
    </script>
</body>
</html>